/*
 * UserFacade.java
 *
 * Created on 7 de Julho de 2007, 11:29
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package br.com.ecs.presentation.delegate;

import br.com.ecs.persistence.entity.Payments;
import br.com.ecs.persistence.entity.SystemUser;
import br.com.ecs.persistence.facade.PaymentsFacadeLocal;
import java.util.List;
import javax.ejb.Stateless;

/**
 *
 * @author Danielle
 */
@Stateless
public class PaymentsBusinessDelegate {

    private PaymentsFacadeLocal paymentsFacade;
    
    private PaymentsFacadeLocal lookupPaymentsFacade() {
        
    try {
        javax.naming.Context c = new javax.naming.InitialContext();
        return (PaymentsFacadeLocal) c.lookup("java:comp/env/br/com/ecs/persistence/PaymentsFacadeLocal");
    }
    catch(javax.naming.NamingException ne) {
        java.util.logging.Logger.getLogger(getClass().
                    getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
        throw new RuntimeException(ne);
    }
}
    
    /** Creates a new instance of UserFacade */
    public PaymentsBusinessDelegate() {
    }

    public void create(Payments payments) {
        paymentsFacade.create(payments);
    }

    public void edit(Payments payments) {
        paymentsFacade.edit(payments);
    }

    public void destroy(Payments payments) {
        paymentsFacade.destroy(payments);
    }

    public Payments find(Object pk) {
        return (Payments) paymentsFacade.find(pk);
    }

    public List findAll() {
        return paymentsFacade.findAll();
    }
    
}
